package com.google.code.sapwcrawler;

import com.google.code.sapwcrawler.download.cycle.DownloadCycle;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Crawler implements Runnable
{
	static private Logger logger = Logger.getLogger(Crawler.class.toString());
	
	static public final String getVersion()
	{
		return "0.1";
	}
	
	private DownloadCycle downloadCycle;
	private String host;
	
	public void setHost(String host)
	{
		this.host = host;
	}
	
	public String getHost()
	{
		return this.host;
	}
	
	public void setDownloadCycle(DownloadCycle v)
	{
		this.downloadCycle = v;
	}
	
	public void run()
	{
		try
		{
			this.downloadCycle.run();
		}
		catch(Throwable e)
		{
			e.printStackTrace();
			logger.log(Level.SEVERE,e.toString());
		}
	}
}
